module tb_adder4;
      reg [3:0] A;
      reg [3:0] B;
      reg CI;
      wire [3:0] SUM;
      wire CO;
      reg [9:0] i;

      cla_adder_4 DUB(.A(A), .B(B), .CI(CI),.SUM(SUM),.CO(CO));

      initial
      begin
       	for(i=10'b0000000000; i!=10'b1000000000; i=i+1) begin
           #10 A = i[3:0];
	       B = i[7:4];
	       CI = i[8];
	 end
      end

      always@(A,B,CI,SUM,CO)
	begin
	  #5
	  $display("A : %b, B : %b, Cin: %b", A, B, CI);
	  $display("S : %b, Cout : %b", SUM, CO);
	end
endmodule
